package com.ruoyi.business.utils;

import com.ruoyi.business.error.model.ErrorCode;
import lombok.Data;

/*、
 * 自定义异常类
    @Author wyb
 * @Date 2025-07-15
 * */
@Data
public class MyException extends RuntimeException {
    private String code;
    private String message;

    public MyException(String message) {
        this.message = message;
    }

    public MyException(ErrorCode errorCode) {
        this.code = errorCode.getCode();
        this.message = errorCode.getMessage();
    }
}
